home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Disc to the Future 2
/
Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin
/
MAC
/
THINKC
/
TCL1
/
CSPINNER
/
CSPINNER._DO
next >
Wrap
Text File
|
1990-12-20
|
3KB
|
81 lines
CSpinner Docs
CSpinner is a class which implements a spinning cursor, usually
used to indicate that a program is busy (and hasn't crashed).
⌐ 1990 SPLAsh Resources. All rights reserved.
Written by: Gregory H. Dow
Programmers may freely use the accompanying source code and may include
object code generated from the source code in their own programs, commercial
or otherwise, without any attribution. However, the source code may not be
sold or distributed on bulletin board services without written permission
from SPLAsh Resources.
SPLAsh Resources
1678 Shattuck Ave #302
Berkeley, CA 94709
(415) 527-0122
Methods:
ISpinner - Initialization
Parameters
short acurID ID of an 'acur' resource. An 'acur' is a list
of 'CURS' (cursor) resource ID's. The Spinner
creates the illusion of spinning by using each
cursor in the list as a animation "frame", wrapping
around to the beginning when the end is reached.
short aThreshold Length of time, in ticks, to delay before starting
the first spin. This suppresses spinning for
short operations. For example, The Finder uses a delay
of about 2 seconds (120 ticks) before spinning the
cursor when copying files.
short anInterval Length of time, in ticks, between cursor changes.
This controls the speed of the spinning.
Dispose - Destruction
Reset - Reset internal counters to initial values. Generally used after finishing
an operation to cause subsequent operations to observe the threshold
time before starting to spin.
SetTimes - Specify new threshold and interval. The new threshold takes effect if
Reset() is called before the next spin. The new interval takes effect
after the next spin.
Parameters
short newThreshold New threshold time, in ticks
short newInterval New interval time, in ticks
Spin - Spins by changing the cursor to next one in the 'acur' list if sufficient
time has passed since the last spin. Must be called repeatedly during
an operation.
Limitations:
CSpinner does not perform error checking. The 'acur' and associated 'CURS'
resources must exist, otherwise the program will behave erratically.
Example Usage:
theSpinner = new(CSpinner);
theSpinner->ISpinner(acurID, thresholdTime, intervalTime);
while (condition) {
theSpinner->Spin();
{Do something}
}
theSpinner->Dispose();